home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Source / Sieve / SIEVEATL / SIEVEATL.C < prev    next >
C/C++ Source or Header  |  1996-06-06  |  26KB  |  893 lines

  1. /* this ALWAYS GENERATED file contains the proxy stub code */
  2.  
  3.  
  4. /* File created by MIDL compiler version 3.00.15 */
  5. /* at Fri Jun 07 00:05:00 1996
  6.  */
  7. /* Compiler settings for SieveAtl.idl:
  8.     Os, W1, Zp8, env=Win32, ms_ext, c_ext
  9.     error checks: none
  10. */
  11. //@@MIDL_FILE_HEADING(  )
  12.  
  13. #include "rpcproxy.h"
  14. #include "SieveAtl.h"
  15.  
  16. #define TYPE_FORMAT_STRING_SIZE   61                                
  17. #define PROC_FORMAT_STRING_SIZE   19                                
  18.  
  19. typedef struct _MIDL_TYPE_FORMAT_STRING
  20.     {
  21.     short          Pad;
  22.     unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
  23.     } MIDL_TYPE_FORMAT_STRING;
  24.  
  25. typedef struct _MIDL_PROC_FORMAT_STRING
  26.     {
  27.     short          Pad;
  28.     unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
  29.     } MIDL_PROC_FORMAT_STRING;
  30.  
  31.  
  32. extern const MIDL_TYPE_FORMAT_STRING __MIDLTypeFormatString;
  33. extern const MIDL_PROC_FORMAT_STRING __MIDLProcFormatString;
  34.  
  35.  
  36. /* Object interface: IUnknown, ver. 0.0,
  37.    GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
  38.  
  39.  
  40. /* Object interface: IDispatch, ver. 0.0,
  41.    GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
  42.  
  43.  
  44. /* Object interface: ICSieveATL, ver. 0.0,
  45.    GUID={0x18315EE3,0xB8D4,0x11CF,{0xAE,0xC1,0x44,0x45,0x53,0x54,0x00,0x00}} */
  46.  
  47.  
  48. extern const MIDL_STUB_DESC Object_StubDesc;
  49.  
  50.  
  51. #pragma code_seg(".orpc")
  52.  
  53. /* [propget] */ HRESULT STDMETHODCALLTYPE ICSieveATL_get_NextPrime_Proxy( 
  54.     ICSieveATL __RPC_FAR * This,
  55.     /* [retval][out] */ short __RPC_FAR *pi)
  56. {
  57.  
  58.     HRESULT _RetVal;
  59.     
  60.     RPC_MESSAGE _RpcMessage;
  61.     
  62.     MIDL_STUB_MESSAGE _StubMsg;
  63.     
  64.     RpcTryExcept
  65.         {
  66.         RpcTryFinally
  67.             {
  68.             NdrProxyInitialize(
  69.                       ( void __RPC_FAR *  )This,
  70.                       ( PRPC_MESSAGE  )&_RpcMessage,
  71.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  72.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  73.                       7);
  74.             
  75.             
  76.             
  77.             
  78.             _StubMsg.BufferLength = 0U;
  79.             NdrProxyGetBuffer(This, &_StubMsg);
  80.             NdrProxySendReceive(This, &_StubMsg);
  81.             
  82.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  83.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[0] );
  84.             
  85.             *pi = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  86.             
  87.             _StubMsg.Buffer += 2;
  88.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  89.             
  90.             }
  91.         RpcFinally
  92.             {
  93.             NdrProxyFreeBuffer(This, &_StubMsg);
  94.             
  95.             }
  96.         RpcEndFinally
  97.         
  98.         }
  99.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  100.         {
  101.         NdrClearOutParameters(
  102.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  103.                          ( PFORMAT_STRING  )&__MIDLTypeFormatString.Format[0],
  104.                          ( void __RPC_FAR * )pi);
  105.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  106.         }
  107.     RpcEndExcept
  108.     return _RetVal;
  109. }
  110.  
  111. void __RPC_STUB ICSieveATL_get_NextPrime_Stub(
  112.     IRpcStubBuffer *This,
  113.     IRpcChannelBuffer *_pRpcChannelBuffer,
  114.     PRPC_MESSAGE _pRpcMessage,
  115.     DWORD *_pdwStubPhase)
  116. {
  117.     short _M0;
  118.     HRESULT _RetVal;
  119.     MIDL_STUB_MESSAGE _StubMsg;
  120.     short __RPC_FAR *pi;
  121.     
  122. NdrStubInitialize(
  123.                      _pRpcMessage,
  124.                      &_StubMsg,
  125.                      &Object_StubDesc,
  126.                      _pRpcChannelBuffer);
  127.     pi = 0;
  128.     RpcTryFinally
  129.         {
  130.         pi = &_M0;
  131.         
  132.         *_pdwStubPhase = STUB_CALL_SERVER;
  133.         _RetVal = (((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> get_NextPrime((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject,pi);
  134.         
  135.         *_pdwStubPhase = STUB_MARSHAL;
  136.         
  137.         _StubMsg.BufferLength = 2U + 6U;
  138.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  139.         *(( short __RPC_FAR * )_StubMsg.Buffer)++ = *pi;
  140.         
  141.         _StubMsg.Buffer += 2;
  142.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  143.         
  144.         }
  145.     RpcFinally
  146.         {
  147.         }
  148.     RpcEndFinally
  149.     _pRpcMessage->BufferLength = 
  150.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  151.     
  152. }
  153.  
  154.  
  155. /* [propget] */ HRESULT STDMETHODCALLTYPE ICSieveATL_get_MaxPrime_Proxy( 
  156.     ICSieveATL __RPC_FAR * This,
  157.     /* [retval][out] */ short __RPC_FAR *pi)
  158. {
  159.  
  160.     HRESULT _RetVal;
  161.     
  162.     RPC_MESSAGE _RpcMessage;
  163.     
  164.     MIDL_STUB_MESSAGE _StubMsg;
  165.     
  166.     RpcTryExcept
  167.         {
  168.         RpcTryFinally
  169.             {
  170.             NdrProxyInitialize(
  171.                       ( void __RPC_FAR *  )This,
  172.                       ( PRPC_MESSAGE  )&_RpcMessage,
  173.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  174.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  175.                       8);
  176.             
  177.             
  178.             
  179.             
  180.             _StubMsg.BufferLength = 0U;
  181.             NdrProxyGetBuffer(This, &_StubMsg);
  182.             NdrProxySendReceive(This, &_StubMsg);
  183.             
  184.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  185.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[0] );
  186.             
  187.             *pi = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  188.             
  189.             _StubMsg.Buffer += 2;
  190.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  191.             
  192.             }
  193.         RpcFinally
  194.             {
  195.             NdrProxyFreeBuffer(This, &_StubMsg);
  196.             
  197.             }
  198.         RpcEndFinally
  199.         
  200.         }
  201.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  202.         {
  203.         NdrClearOutParameters(
  204.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  205.                          ( PFORMAT_STRING  )&__MIDLTypeFormatString.Format[0],
  206.                          ( void __RPC_FAR * )pi);
  207.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  208.         }
  209.     RpcEndExcept
  210.     return _RetVal;
  211. }
  212.  
  213. void __RPC_STUB ICSieveATL_get_MaxPrime_Stub(
  214.     IRpcStubBuffer *This,
  215.     IRpcChannelBuffer *_pRpcChannelBuffer,
  216.     PRPC_MESSAGE _pRpcMessage,
  217.     DWORD *_pdwStubPhase)
  218. {
  219.     short _M1;
  220.     HRESULT _RetVal;
  221.     MIDL_STUB_MESSAGE _StubMsg;
  222.     short __RPC_FAR *pi;
  223.     
  224. NdrStubInitialize(
  225.                      _pRpcMessage,
  226.                      &_StubMsg,
  227.                      &Object_StubDesc,
  228.                      _pRpcChannelBuffer);
  229.     pi = 0;
  230.     RpcTryFinally
  231.         {
  232.         pi = &_M1;
  233.         
  234.         *_pdwStubPhase = STUB_CALL_SERVER;
  235.         _RetVal = (((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> get_MaxPrime((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject,pi);
  236.         
  237.         *_pdwStubPhase = STUB_MARSHAL;
  238.         
  239.         _StubMsg.BufferLength = 2U + 6U;
  240.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  241.         *(( short __RPC_FAR * )_StubMsg.Buffer)++ = *pi;
  242.         
  243.         _StubMsg.Buffer += 2;
  244.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  245.         
  246.         }
  247.     RpcFinally
  248.         {
  249.         }
  250.     RpcEndFinally
  251.     _pRpcMessage->BufferLength = 
  252.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  253.     
  254. }
  255.  
  256.  
  257. /* [propput] */ HRESULT STDMETHODCALLTYPE ICSieveATL_put_MaxPrime_Proxy( 
  258.     ICSieveATL __RPC_FAR * This,
  259.     /* [in] */ short i)
  260. {
  261.  
  262.     HRESULT _RetVal;
  263.     
  264.     RPC_MESSAGE _RpcMessage;
  265.     
  266.     MIDL_STUB_MESSAGE _StubMsg;
  267.     
  268.     RpcTryExcept
  269.         {
  270.         RpcTryFinally
  271.             {
  272.             NdrProxyInitialize(
  273.                       ( void __RPC_FAR *  )This,
  274.                       ( PRPC_MESSAGE  )&_RpcMessage,
  275.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  276.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  277.                       9);
  278.             
  279.             
  280.             
  281.             
  282.             _StubMsg.BufferLength = 2U;
  283.             NdrProxyGetBuffer(This, &_StubMsg);
  284.             *(( short __RPC_FAR * )_StubMsg.Buffer)++ = i;
  285.             
  286.             NdrProxySendReceive(This, &_StubMsg);
  287.             
  288.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  289.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[6] );
  290.             
  291.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  292.             
  293.             }
  294.         RpcFinally
  295.             {
  296.             NdrProxyFreeBuffer(This, &_StubMsg);
  297.             
  298.             }
  299.         RpcEndFinally
  300.         
  301.         }
  302.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  303.         {
  304.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  305.         }
  306.     RpcEndExcept
  307.     return _RetVal;
  308. }
  309.  
  310. void __RPC_STUB ICSieveATL_put_MaxPrime_Stub(
  311.     IRpcStubBuffer *This,
  312.     IRpcChannelBuffer *_pRpcChannelBuffer,
  313.     PRPC_MESSAGE _pRpcMessage,
  314.     DWORD *_pdwStubPhase)
  315. {
  316.     HRESULT _RetVal;
  317.     MIDL_STUB_MESSAGE _StubMsg;
  318.     short i;
  319.     
  320. NdrStubInitialize(
  321.                      _pRpcMessage,
  322.                      &_StubMsg,
  323.                      &Object_StubDesc,
  324.                      _pRpcChannelBuffer);
  325.     RpcTryFinally
  326.         {
  327.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  328.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[6] );
  329.         
  330.         i = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  331.         
  332.         
  333.         *_pdwStubPhase = STUB_CALL_SERVER;
  334.         _RetVal = (((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> put_MaxPrime((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject,i);
  335.         
  336.         *_pdwStubPhase = STUB_MARSHAL;
  337.         
  338.         _StubMsg.BufferLength = 4U;
  339.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  340.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  341.         
  342.         }
  343.     RpcFinally
  344.         {
  345.         }
  346.     RpcEndFinally
  347.     _pRpcMessage->BufferLength = 
  348.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  349.     
  350. }
  351.  
  352.  
  353. /* [propget] */ HRESULT STDMETHODCALLTYPE ICSieveATL_get_Primes_Proxy( 
  354.     ICSieveATL __RPC_FAR * This,
  355.     /* [retval][out] */ short __RPC_FAR *pi)
  356. {
  357.  
  358.     HRESULT _RetVal;
  359.     
  360.     RPC_MESSAGE _RpcMessage;
  361.     
  362.     MIDL_STUB_MESSAGE _StubMsg;
  363.     
  364.     RpcTryExcept
  365.         {
  366.         RpcTryFinally
  367.             {
  368.             NdrProxyInitialize(
  369.                       ( void __RPC_FAR *  )This,
  370.                       ( PRPC_MESSAGE  )&_RpcMessage,
  371.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  372.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  373.                       10);
  374.             
  375.             
  376.             
  377.             
  378.             _StubMsg.BufferLength = 0U;
  379.             NdrProxyGetBuffer(This, &_StubMsg);
  380.             NdrProxySendReceive(This, &_StubMsg);
  381.             
  382.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  383.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[0] );
  384.             
  385.             *pi = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  386.             
  387.             _StubMsg.Buffer += 2;
  388.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  389.             
  390.             }
  391.         RpcFinally
  392.             {
  393.             NdrProxyFreeBuffer(This, &_StubMsg);
  394.             
  395.             }
  396.         RpcEndFinally
  397.         
  398.         }
  399.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  400.         {
  401.         NdrClearOutParameters(
  402.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  403.                          ( PFORMAT_STRING  )&__MIDLTypeFormatString.Format[0],
  404.                          ( void __RPC_FAR * )pi);
  405.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  406.         }
  407.     RpcEndExcept
  408.     return _RetVal;
  409. }
  410.  
  411. void __RPC_STUB ICSieveATL_get_Primes_Stub(
  412.     IRpcStubBuffer *This,
  413.     IRpcChannelBuffer *_pRpcChannelBuffer,
  414.     PRPC_MESSAGE _pRpcMessage,
  415.     DWORD *_pdwStubPhase)
  416. {
  417.     short _M2;
  418.     HRESULT _RetVal;
  419.     MIDL_STUB_MESSAGE _StubMsg;
  420.     short __RPC_FAR *pi;
  421.     
  422. NdrStubInitialize(
  423.                      _pRpcMessage,
  424.                      &_StubMsg,
  425.                      &Object_StubDesc,
  426.                      _pRpcChannelBuffer);
  427.     pi = 0;
  428.     RpcTryFinally
  429.         {
  430.         pi = &_M2;
  431.         
  432.         *_pdwStubPhase = STUB_CALL_SERVER;
  433.         _RetVal = (((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> get_Primes((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject,pi);
  434.         
  435.         *_pdwStubPhase = STUB_MARSHAL;
  436.         
  437.         _StubMsg.BufferLength = 2U + 6U;
  438.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  439.         *(( short __RPC_FAR * )_StubMsg.Buffer)++ = *pi;
  440.         
  441.         _StubMsg.Buffer += 2;
  442.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  443.         
  444.         }
  445.     RpcFinally
  446.         {
  447.         }
  448.     RpcEndFinally
  449.     _pRpcMessage->BufferLength = 
  450.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  451.     
  452. }
  453.  
  454.  
  455. HRESULT STDMETHODCALLTYPE ICSieveATL_ReInitialize_Proxy( 
  456.     ICSieveATL __RPC_FAR * This)
  457. {
  458.  
  459.     HRESULT _RetVal;
  460.     
  461.     RPC_MESSAGE _RpcMessage;
  462.     
  463.     MIDL_STUB_MESSAGE _StubMsg;
  464.     
  465.     RpcTryExcept
  466.         {
  467.         RpcTryFinally
  468.             {
  469.             NdrProxyInitialize(
  470.                       ( void __RPC_FAR *  )This,
  471.                       ( PRPC_MESSAGE  )&_RpcMessage,
  472.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  473.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  474.                       11);
  475.             
  476.             
  477.             
  478.             
  479.             _StubMsg.BufferLength = 0U;
  480.             NdrProxyGetBuffer(This, &_StubMsg);
  481.             NdrProxySendReceive(This, &_StubMsg);
  482.             
  483.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  484.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[10] );
  485.             
  486.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  487.             
  488.             }
  489.         RpcFinally
  490.             {
  491.             NdrProxyFreeBuffer(This, &_StubMsg);
  492.             
  493.             }
  494.         RpcEndFinally
  495.         
  496.         }
  497.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  498.         {
  499.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  500.         }
  501.     RpcEndExcept
  502.     return _RetVal;
  503. }
  504.  
  505. void __RPC_STUB ICSieveATL_ReInitialize_Stub(
  506.     IRpcStubBuffer *This,
  507.     IRpcChannelBuffer *_pRpcChannelBuffer,
  508.     PRPC_MESSAGE _pRpcMessage,
  509.     DWORD *_pdwStubPhase)
  510. {
  511.     HRESULT _RetVal;
  512.     MIDL_STUB_MESSAGE _StubMsg;
  513.     
  514. NdrStubInitialize(
  515.                      _pRpcMessage,
  516.                      &_StubMsg,
  517.                      &Object_StubDesc,
  518.                      _pRpcChannelBuffer);
  519.     RpcTryFinally
  520.         {
  521.         
  522.         *_pdwStubPhase = STUB_CALL_SERVER;
  523.         _RetVal = (((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> ReInitialize((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject);
  524.         
  525.         *_pdwStubPhase = STUB_MARSHAL;
  526.         
  527.         _StubMsg.BufferLength = 4U;
  528.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  529.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  530.         
  531.         }
  532.     RpcFinally
  533.         {
  534.         }
  535.     RpcEndFinally
  536.     _pRpcMessage->BufferLength = 
  537.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  538.     
  539. }
  540.  
  541.  
  542. HRESULT STDMETHODCALLTYPE ICSieveATL_AllPrimes_Proxy( 
  543.     ICSieveATL __RPC_FAR * This,
  544.     /* [out][in] */ SAFEARRAY __RPC_FAR *__RPC_FAR *ai)
  545. {
  546.  
  547.     HRESULT _RetVal;
  548.     
  549.     RPC_MESSAGE _RpcMessage;
  550.     
  551.     MIDL_STUB_MESSAGE _StubMsg;
  552.     
  553.     RpcTryExcept
  554.         {
  555.         RpcTryFinally
  556.             {
  557.             NdrProxyInitialize(
  558.                       ( void __RPC_FAR *  )This,
  559.                       ( PRPC_MESSAGE  )&_RpcMessage,
  560.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  561.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  562.                       12);
  563.             
  564.             
  565.             
  566.             
  567.             _StubMsg.BufferLength = 4U;
  568.             NdrPointerBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  569.                                   (unsigned char __RPC_FAR *)ai,
  570.                                   (PFORMAT_STRING) &__MIDLTypeFormatString.Format[4] );
  571.             
  572.             NdrProxyGetBuffer(This, &_StubMsg);
  573.             NdrPointerMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  574.                                 (unsigned char __RPC_FAR *)ai,
  575.                                 (PFORMAT_STRING) &__MIDLTypeFormatString.Format[4] );
  576.             
  577.             NdrProxySendReceive(This, &_StubMsg);
  578.             
  579.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  580.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[12] );
  581.             
  582.             NdrPointerUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  583.                                   (unsigned char __RPC_FAR * __RPC_FAR *)&ai,
  584.                                   (PFORMAT_STRING) &__MIDLTypeFormatString.Format[4],
  585.                                   (unsigned char)0 );
  586.             
  587.             _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  588.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  589.             
  590.             }
  591.         RpcFinally
  592.             {
  593.             NdrProxyFreeBuffer(This, &_StubMsg);
  594.             
  595.             }
  596.         RpcEndFinally
  597.         
  598.         }
  599.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  600.         {
  601.         NdrClearOutParameters(
  602.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  603.                          ( PFORMAT_STRING  )&__MIDLTypeFormatString.Format[4],
  604.                          ( void __RPC_FAR * )ai);
  605.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  606.         }
  607.     RpcEndExcept
  608.     return _RetVal;
  609. }
  610.  
  611. void __RPC_STUB ICSieveATL_AllPrimes_Stub(
  612.     IRpcStubBuffer *This,
  613.     IRpcChannelBuffer *_pRpcChannelBuffer,
  614.     PRPC_MESSAGE _pRpcMessage,
  615.     DWORD *_pdwStubPhase)
  616. {
  617.     HRESULT _RetVal;
  618.     MIDL_STUB_MESSAGE _StubMsg;
  619.     SAFEARRAY __RPC_FAR *__RPC_FAR *ai;
  620.     
  621. NdrStubInitialize(
  622.                      _pRpcMessage,
  623.                      &_StubMsg,
  624.                      &Object_StubDesc,
  625.                      _pRpcChannelBuffer);
  626.     ai = 0;
  627.     RpcTryFinally
  628.         {
  629.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  630.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[12] );
  631.         
  632.         NdrPointerUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  633.                               (unsigned char __RPC_FAR * __RPC_FAR *)&ai,
  634.                               (PFORMAT_STRING) &__MIDLTypeFormatString.Format[4],
  635.                               (unsigned char)0 );
  636.         
  637.         
  638.         *_pdwStubPhase = STUB_CALL_SERVER;
  639.         _RetVal = (((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> AllPrimes((ICSieveATL *) ((CStdStubBuffer *)This)->pvServerObject,ai);
  640.         
  641.         *_pdwStubPhase = STUB_MARSHAL;
  642.         
  643.         _StubMsg.BufferLength = 4U + 11U;
  644.         NdrPointerBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  645.                               (unsigned char __RPC_FAR *)ai,
  646.                               (PFORMAT_STRING) &__MIDLTypeFormatString.Format[4] );
  647.         
  648.         _StubMsg.BufferLength += 16;
  649.         
  650.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  651.         NdrPointerMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  652.                             (unsigned char __RPC_FAR *)ai,
  653.                             (PFORMAT_STRING) &__MIDLTypeFormatString.Format[4] );
  654.         
  655.         _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  656.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  657.         
  658.         }
  659.     RpcFinally
  660.         {
  661.         NdrPointerFree( &_StubMsg,
  662.                         (unsigned char __RPC_FAR *)ai,
  663.                         &__MIDLTypeFormatString.Format[4] );
  664.         
  665.         }
  666.     RpcEndFinally
  667.     _pRpcMessage->BufferLength = 
  668.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  669.     
  670. }
  671.  
  672.  
  673. static const MIDL_STUB_DESC Object_StubDesc = 
  674.     {
  675.     0,
  676.     NdrOleAllocate,
  677.     NdrOleFree,
  678.     0,
  679.     0,
  680.     0,
  681.     0,
  682.     0,
  683.     __MIDLTypeFormatString.Format,
  684.     0, /* -error bounds_check flag */
  685.     0x10001, /* Ndr library version */
  686.     0,
  687.     0x300000f, /* MIDL Version 3.0.15 */
  688.     0,
  689.     0,
  690.     0,  /* Reserved1 */
  691.     0,  /* Reserved2 */
  692.     0,  /* Reserved3 */
  693.     0,  /* Reserved4 */
  694.     0   /* Reserved5 */
  695.     };
  696.  
  697. CINTERFACE_PROXY_VTABLE(13) _ICSieveATLProxyVtbl = 
  698. {
  699.     &IID_ICSieveATL,
  700.     IUnknown_QueryInterface_Proxy,
  701.     IUnknown_AddRef_Proxy,
  702.     IUnknown_Release_Proxy ,
  703.     0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
  704.     0 /* IDispatch_GetTypeInfo_Proxy */ ,
  705.     0 /* IDispatch_GetIDsOfNames_Proxy */ ,
  706.     0 /* IDispatch_Invoke_Proxy */ ,
  707.     ICSieveATL_get_NextPrime_Proxy ,
  708.     ICSieveATL_get_MaxPrime_Proxy ,
  709.     ICSieveATL_put_MaxPrime_Proxy ,
  710.     ICSieveATL_get_Primes_Proxy ,
  711.     ICSieveATL_ReInitialize_Proxy ,
  712.     ICSieveATL_AllPrimes_Proxy
  713. };
  714.  
  715.  
  716. static const PRPC_STUB_FUNCTION ICSieveATL_table[] =
  717. {
  718.     STUB_FORWARDING_FUNCTION,
  719.     STUB_FORWARDING_FUNCTION,
  720.     STUB_FORWARDING_FUNCTION,
  721.     STUB_FORWARDING_FUNCTION,
  722.     ICSieveATL_get_NextPrime_Stub,
  723.     ICSieveATL_get_MaxPrime_Stub,
  724.     ICSieveATL_put_MaxPrime_Stub,
  725.     ICSieveATL_get_Primes_Stub,
  726.     ICSieveATL_ReInitialize_Stub,
  727.     ICSieveATL_AllPrimes_Stub
  728. };
  729.  
  730. CInterfaceStubVtbl _ICSieveATLStubVtbl =
  731. {
  732.     &IID_ICSieveATL,
  733.     0,
  734.     13,
  735.     &ICSieveATL_table[-3],
  736.     CStdStubBuffer_DELEGATING_METHODS
  737. };
  738.  
  739. #pragma data_seg(".rdata")
  740.  
  741. #if !defined(__RPC_WIN32__)
  742. #error  Invalid build platform for this stub.
  743. #endif
  744.  
  745. static const MIDL_PROC_FORMAT_STRING __MIDLProcFormatString =
  746.     {
  747.         0,
  748.         {
  749.             
  750.             0x51,        /* FC_OUT_PARAM */
  751. #ifndef _ALPHA_
  752.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  753. #else
  754.             0x2,        /* Alpha Stack size = 2 */
  755. #endif
  756. /*  2 */    NdrFcShort( 0x0 ),    /* Type Offset=0 */
  757. /*  4 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  758.             0x8,        /* FC_LONG */
  759. /*  6 */    0x4e,        /* FC_IN_PARAM_BASETYPE */
  760.             0x6,        /* FC_SHORT */
  761. /*  8 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  762.             0x8,        /* FC_LONG */
  763. /* 10 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  764.             0x8,        /* FC_LONG */
  765. /* 12 */    
  766.             0x50,        /* FC_IN_OUT_PARAM */
  767. #ifndef _ALPHA_
  768.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  769. #else
  770.             0x2,        /* Alpha Stack size = 2 */
  771. #endif
  772. /* 14 */    NdrFcShort( 0x4 ),    /* Type Offset=4 */
  773. /* 16 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  774.             0x8,        /* FC_LONG */
  775.  
  776.             0x0
  777.         }
  778.     };
  779.  
  780. static const MIDL_TYPE_FORMAT_STRING __MIDLTypeFormatString =
  781.     {
  782.         0,
  783.         {
  784.             0x11, 0xc,    /* FC_RP [alloced_on_stack] [simple_pointer] */
  785. /*  2 */    0x6,        /* FC_SHORT */
  786.             0x5c,        /* FC_PAD */
  787. /*  4 */    
  788.             0x11, 0x10,    /* FC_RP */
  789. /*  6 */    NdrFcShort( 0x2 ),    /* Offset= 2 (8) */
  790. /*  8 */    
  791.             0x13, 0x0,    /* FC_OP */
  792. /* 10 */    NdrFcShort( 0x18 ),    /* Offset= 24 (34) */
  793. /* 12 */    
  794.             0x15,        /* FC_STRUCT */
  795.             0x3,        /* 3 */
  796. /* 14 */    NdrFcShort( 0x8 ),    /* 8 */
  797. /* 16 */    0x8,        /* FC_LONG */
  798.             0x8,        /* FC_LONG */
  799. /* 18 */    0x5c,        /* FC_PAD */
  800.             0x5b,        /* FC_END */
  801. /* 20 */    
  802.             0x1b,        /* FC_CARRAY */
  803.             0x3,        /* 3 */
  804. /* 22 */    NdrFcShort( 0x8 ),    /* 8 */
  805. /* 24 */    0x7,        /* 7 */
  806.             0x0,        /*  */
  807. /* 26 */    NdrFcShort( 0xfffffff0 ),    /* -16 */
  808. /* 28 */    0x4c,        /* FC_EMBEDDED_COMPLEX */
  809.             0x0,        /* 0 */
  810. /* 30 */    NdrFcShort( 0xffffffee ),    /* Offset= -18 (12) */
  811. /* 32 */    0x5c,        /* FC_PAD */
  812.             0x5b,        /* FC_END */
  813. /* 34 */    
  814.             0x18,        /* FC_CPSTRUCT */
  815.             0x3,        /* 3 */
  816. /* 36 */    NdrFcShort( 0x10 ),    /* 16 */
  817. /* 38 */    NdrFcShort( 0xffffffee ),    /* Offset= -18 (20) */
  818. /* 40 */    
  819.             0x4b,        /* FC_PP */
  820.             0x5c,        /* FC_PAD */
  821. /* 42 */    
  822.             0x46,        /* FC_NO_REPEAT */
  823.             0x5c,        /* FC_PAD */
  824. /* 44 */    NdrFcShort( 0xc ),    /* 12 */
  825. /* 46 */    NdrFcShort( 0xc ),    /* 12 */
  826. /* 48 */    0x13, 0x8,    /* FC_OP [simple_pointer] */
  827. /* 50 */    0x2,        /* FC_CHAR */
  828.             0x5c,        /* FC_PAD */
  829. /* 52 */    
  830.             0x5b,        /* FC_END */
  831.  
  832.             0x6,        /* FC_SHORT */
  833. /* 54 */    0x6,        /* FC_SHORT */
  834.             0x38,        /* FC_ALIGNM4 */
  835. /* 56 */    0x8,        /* FC_LONG */
  836.             0x8,        /* FC_LONG */
  837. /* 58 */    0x8,        /* FC_LONG */
  838.             0x5b,        /* FC_END */
  839.  
  840.             0x0
  841.         }
  842.     };
  843.  
  844. const CInterfaceProxyVtbl * _SieveAtl_ProxyVtblList[] = 
  845. {
  846.     ( CInterfaceProxyVtbl *) &_ICSieveATLProxyVtbl,
  847.     0
  848. };
  849.  
  850. const CInterfaceStubVtbl * _SieveAtl_StubVtblList[] = 
  851. {
  852.     ( CInterfaceStubVtbl *) &_ICSieveATLStubVtbl,
  853.     0
  854. };
  855.  
  856. PCInterfaceName const _SieveAtl_InterfaceNamesList[] = 
  857. {
  858.     "ICSieveATL",
  859.     0
  860. };
  861.  
  862. const IID *  _SieveAtl_BaseIIDList[] = 
  863. {
  864.     &IID_IDispatch,
  865.     0
  866. };
  867.  
  868.  
  869. #define _SieveAtl_CHECK_IID(n)    IID_GENERIC_CHECK_IID( _SieveAtl, pIID, n)
  870.  
  871. int __stdcall _SieveAtl_IID_Lookup( const IID * pIID, int * pIndex )
  872. {
  873.     
  874.     if(!_SieveAtl_CHECK_IID(0))
  875.         {
  876.         *pIndex = 0;
  877.         return 1;
  878.         }
  879.  
  880.     return 0;
  881. }
  882.  
  883. const ExtendedProxyFileInfo SieveAtl_ProxyFileInfo = 
  884. {
  885.     (PCInterfaceProxyVtblList *) & _SieveAtl_ProxyVtblList,
  886.     (PCInterfaceStubVtblList *) & _SieveAtl_StubVtblList,
  887.     (const PCInterfaceName * ) & _SieveAtl_InterfaceNamesList,
  888.     (const IID ** ) & _SieveAtl_BaseIIDList,
  889.     & _SieveAtl_IID_Lookup, 
  890.     1,
  891.     1
  892. };
  893.